353368d06ac1369fbe77aee3ac5628077a663db9,xwiki-platform-core/xwiki-platform-watchlist/xwiki-platform-watchlist-api/src/main/java/com/xpn/xwiki/plugin/watchlist/WatchListStore.java,WatchListStore,init,#XWikiContext#,307

Before Change


        jobDocumentNames =
            context
                .getWiki()
                .getStore()
                .searchDocumentsNames(
                    ", BaseObject as obj where doc.fullName=obj.name and obj.className='"
                        + WatchListJobManager.WATCHLIST_JOB_CLASS + "'", context);

        initWatchListClass(context);

After Change


    {
        try {
            final Query q =
                context.getWiki().getStore().getQueryManager().getNamedQuery("getWatchlistJobDocuments");
            this.jobDocumentNames = (List<String>) (List) q.execute();
        } catch (QueryException e) {
            throw new XWikiException(0, 0, "Failed to run query for watchlist jobs.", e);
        }